<h2>Financial Projections</h2>

<div class="block tabs spaces">
	
	<div class="hd">
			<ul>
				<li><a href="<?=site_url('reporting/');?>">Studio Status</a></li>
				<li><a href="<?=site_url('reporting/projection');?>">Projection</a></li>
				<li><a href="<?=site_url('reporting/invoicing');?>">Invoicing</a></li>
			</ul>
		<div class="clear"></div>		
	</div>
	
	<div class="bd">


<?php if ($jobvalues):?>

<img src="<?=$charturl;?>" />

<table class="projects">
	<thead>
	<tr>
		<th class="project">Project</th>
		<th class="client">Client</th>
		<th class="value numberfield">Value (&pound;)</th>
		<th class="client">Status</th>
		<th class="due">Estimated End Date</th>
	</tr>
	</thead>
<tbody>

	<?php $total_sum = 0;?>
	<?php foreach($jobvalues as $job):?>
		<?php $total_sum += $job->value;?>
		<tr>
			<td><a href="<?=site_url('jobs/showUpdates/'.$job->jobid);?>"><?=$job->job_title;?></a></td>
			<td><a href="<?=site_url('companies/view/'.$job->companyid);?>"><?=$job->company_name;?></a></td>
			<td class="numberfield"><?=number_format($job->value, 2);?></td>
			<td><?=ucfirst($job->job_status);?></td>
			<td><?=date('d/m/Y', strtotime($job->estdate));?></td>
		</tr>
	<?php endforeach;?>
</tbody>
<tfoot>
	<tr>
		<td colspan="2"></td><td class="numberfield"><?=number_format($total_sum, 2);?></td><td colspan="2"></td>
	</tr>
</tfoot>
</table>
<?php else:?>

<p>No projection data available</p>

<?php endif;?>

</div></div>